package com.zzq.Model;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;

@ApiModel("评论类")
@Data
@Accessors(chain = true)
public class Comment {
    @ApiModelProperty("序号")
    private int id;
    @ApiModelProperty("文章序号")
    private int articleId;
    @ApiModelProperty("用户序号")
    private int userId;
    @ApiModelProperty("评论内容")
    private String body;
    @ApiModelProperty("创建时间")    //设置时区为上海时区，时间格式自己据需求定。
    @JsonFormat(pattern="yyyy-MM-dd",timezone = "GMT+8")
    private String createTime;
    @ApiModelProperty("点赞数")
    private int likes;

}
